package com.tuju.currency.app;

import com.tuju.currency.App;
import com.tuju.currency.network.cache.ACache;
import com.tuju.currency.utils.SPUtils;

public class AppConfig {

    //登录状态
    private static final String LOGIN_STATE_KEY = "login.state";

    /**
     * 保存登录状态
     */
    public static void saveLoginState(boolean state) {
        SPUtils.putBoolean(LOGIN_STATE_KEY, state);
    }

    public static boolean getLoginState() {
        return SPUtils.getBoolean(LOGIN_STATE_KEY, false);
    }

    public static void clear() {
        saveLoginState(false);
        ACache.get(App.instrance).clear();
    }


}
